import httpInstance from "@/utils/http"
// 封装购物车相关接口

// 加入购物车
export const insertCart = ({skuId,count}) => {
  return httpInstance.post('/member/cart',{skuId,count})
}

// 获取最新的购物车列表
export const findNewCartList = () => {
  return httpInstance.get('/member/cart')
}

// 删除购物车
export const DelCart = (ids) => {
  return httpInstance.delete('/member/cart',{
    data:{
      ids
    }
  })
}

// 合并购物车
export const  mergeCart= (data) => {
  return httpInstance.post('/member/cart/merge',data)
}